package com.vnp.cooking.fragment;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;
import com.vnp.cooking.R;
import com.vnp.cooking.UIcontrols.RounderImageView;

import android.graphics.Bitmap.Config;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

public class ImageFragmentLogin extends Fragment {

	private final String urlImage;
	DisplayImageOptions options = new DisplayImageOptions.Builder()
								.cacheInMemory(false)
								.cacheOnDisc(true)
								.build();

	public ImageFragmentLogin(String urlImage) {
		this.urlImage = urlImage;
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.e("Test", "hello");
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.cover_login_item, container,
				false);
		RounderImageView imageView = (RounderImageView) view.findViewById(R.id.img_login_item);
		imageView.initAvatarLayout(getActivity());
		ImageLoader.getInstance().displayImage(urlImage, imageView, options);
		return view;
	}
}
